﻿using Domain.Entity;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCore.Configers
{
    public class ESConfigers : IEntityTypeConfiguration<ES>
    {
        public void Configure(EntityTypeBuilder<ES> builder)
        {
            builder.ToTable(nameof(ES));
            builder.Property(x => x.FirstKindId).IsRequired(false).HasMaxLength(2);
            builder.Property(x => x.FirstKindName).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.SecondKindId).IsRequired(false).HasMaxLength(2);
            builder.Property(x => x.SecondKindName).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.Register).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.RegistTime).IsRequired(false);
            builder.Property(x => x.Derivation).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.Content).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.KeyA).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.KeyB).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.KeyC).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.KeyD).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.KeyE).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.CorrectKey).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.Changer).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.ChangeTime).IsRequired(false);
        }
    }
}
